package com.qfjy.service.impl.example2;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

/**
 * #TODO 天气预报
 */

@Service
@Slf4j
public class WeatherServiceImpl {

    @RabbitListener(queues = {"jdWeatherFanoutQueue"})
       public void jdWeatherMessage(String msg){
           log.info("京东的天气信息：{}",msg);
       }


    @RabbitListener(queues = {"taobaoWeatherFanoutQueue"})
    public void taobaoWeatherMessage(String msg){
        log.info("淘宝的天气信息：{}",msg);
    }
}
